﻿<UserControl x:Class="TestApp.CelestialBodiesDeclarative"
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:kitControls="clr-namespace:Kit3D.Windows.Controls;assembly=Blend3D"
    xmlns:kitMedia3D="clr-namespace:Kit3D.Windows.Media.Media3D;assembly=Blend3D"
    MinWidth="400" MinHeight="400"  Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <Storyboard x:Name="AnimationLoop" Duration="0:0:0.010" Completed="AnimationLoop_Completed">
        </Storyboard>
    </UserControl.Resources>
    <Grid Background="White">
        <kitControls:Viewport3D x:Name="viewport" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <kitControls:Viewport3D.Camera>
                <kitMedia3D:PerspectiveCamera Position="-5,15,25" LookDirection="5,-15,-25" UpDirection="0,1,0" FieldOfView="45"/>
            </kitControls:Viewport3D.Camera>
            <kitControls:Viewport3D.Children>
                <kitMedia3D:ModelVisual3D x:Name="theSunModel">
                    <kitMedia3D:ModelVisual3D.Content>
                        <kitMedia3D:GeometryModel3D>
                            <kitMedia3D:GeometryModel3D.Geometry>
                                <kitMedia3D:MeshGeometry3D>
                                    <kitMedia3D:MeshGeometry3D.Positions>
                                            <kitMedia3D:Point3D>-0.5, 0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5, 0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5,-0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5,-0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5, 0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5, 0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5,-0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5,-0.5,-0.5</kitMedia3D:Point3D>
                                    </kitMedia3D:MeshGeometry3D.Positions>
                                    <kitMedia3D:MeshGeometry3D.TriangleIndices>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                    </kitMedia3D:MeshGeometry3D.TriangleIndices>
                                </kitMedia3D:MeshGeometry3D>
                            </kitMedia3D:GeometryModel3D.Geometry>
                            <kitMedia3D:GeometryModel3D.Material>
                                <kitMedia3D:DiffuseMaterial Brush="Yellow" />
                            </kitMedia3D:GeometryModel3D.Material>
                            <kitMedia3D:GeometryModel3D.Transform>
                                <kitMedia3D:Transform3DGroup>
                                    <!--<kitMedia:Transform3DGroup.Children> OPTIONAL ELEMENT -->
                                        <kitMedia3D:ScaleTransform3D ScaleX="3" ScaleY="3" ScaleZ="3" />
                                        <kitMedia3D:RotateTransform3D>
                                            <kitMedia3D:RotateTransform3D.Rotation>
                                                <kitMedia3D:AxisAngleRotation3D x:Name="sunRotationAngle"/>
                                            </kitMedia3D:RotateTransform3D.Rotation>
                                        </kitMedia3D:RotateTransform3D>
                                    <!--</kitMedia:Transform3DGroup.Children> OPTIONAL ELEMENT -->
                                </kitMedia3D:Transform3DGroup>
                            </kitMedia3D:GeometryModel3D.Transform>
                        </kitMedia3D:GeometryModel3D>
                    </kitMedia3D:ModelVisual3D.Content>
                </kitMedia3D:ModelVisual3D>
                <kitMedia3D:ModelVisual3D>
                    <kitMedia3D:ModelVisual3D.Content>
                        <kitMedia3D:Model3DGroup>
                            <!--<kitMedia:Model3DGroup.Children> OPTIONAL ELEMENT -->
                                <kitMedia3D:GeometryModel3D>
                                    <kitMedia3D:GeometryModel3D.Geometry>
                                    <kitMedia3D:MeshGeometry3D>
                                        <kitMedia3D:MeshGeometry3D.Positions>
                                            <kitMedia3D:Point3D>-0.5, 0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5, 0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5,-0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5,-0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5, 0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5, 0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5,-0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5,-0.5,-0.5</kitMedia3D:Point3D>
                                        </kitMedia3D:MeshGeometry3D.Positions>
                                        <kitMedia3D:MeshGeometry3D.TriangleIndices>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                        </kitMedia3D:MeshGeometry3D.TriangleIndices>
                                    </kitMedia3D:MeshGeometry3D>
                                    <!--<kitMedia:X3DMeshGeometry3D Source="SimpleCube.x3d" DesignTimePath="c:\Documents and Settings\pengt\My Documents\Visual Studio 2008\Projects\Kit3D\CSharp\TestApp"/>-->
                                    </kitMedia3D:GeometryModel3D.Geometry>
                                    <kitMedia3D:GeometryModel3D.Material>
                                        <kitMedia3D:DiffuseMaterial Brush="Cyan" />
                                    </kitMedia3D:GeometryModel3D.Material>
                                    <kitMedia3D:GeometryModel3D.Transform>
                                        <kitMedia3D:RotateTransform3D>
                                            <kitMedia3D:RotateTransform3D.Rotation>
                                                <kitMedia3D:AxisAngleRotation3D />
                                            </kitMedia3D:RotateTransform3D.Rotation>
                                        </kitMedia3D:RotateTransform3D>
                                    </kitMedia3D:GeometryModel3D.Transform>
                                </kitMedia3D:GeometryModel3D>
                                <kitMedia3D:GeometryModel3D>
                                    <kitMedia3D:GeometryModel3D.Geometry>
                                    <kitMedia3D:MeshGeometry3D>
                                        <kitMedia3D:MeshGeometry3D.Positions>
                                            <kitMedia3D:Point3D>-0.5, 0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5, 0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5,-0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5,-0.5, 0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5, 0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5, 0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>0.5,-0.5,-0.5</kitMedia3D:Point3D>
                                            <kitMedia3D:Point3D>-0.5,-0.5,-0.5</kitMedia3D:Point3D>
                                        </kitMedia3D:MeshGeometry3D.Positions>
                                        <kitMedia3D:MeshGeometry3D.TriangleIndices>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>5</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>4</sys:Int32>
                                            <sys:Int32>0</sys:Int32>
                                            <sys:Int32>1</sys:Int32>
                                            <sys:Int32>6</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>7</sys:Int32>
                                            <sys:Int32>3</sys:Int32>
                                            <sys:Int32>2</sys:Int32>
                                        </kitMedia3D:MeshGeometry3D.TriangleIndices>
                                    </kitMedia3D:MeshGeometry3D>
                                </kitMedia3D:GeometryModel3D.Geometry>
                                    <kitMedia3D:GeometryModel3D.Material>
                                        <kitMedia3D:DiffuseMaterial Brush="LightGray" />
                                    </kitMedia3D:GeometryModel3D.Material>
                                    <kitMedia3D:GeometryModel3D.Transform>
                                        <kitMedia3D:Transform3DGroup>
                                            <!--<kitMedia:Transform3DGroup.Children> OPTIONAL ELEMENT -->
                                                <kitMedia3D:ScaleTransform3D ScaleX="0.3" ScaleY="0.3" ScaleZ="0.3" />
                                                <kitMedia3D:TranslateTransform3D OffsetX="2" OffsetY="0" OffsetZ="0" />
                                                <kitMedia3D:RotateTransform3D>
                                                    <kitMedia3D:RotateTransform3D.Rotation>
                                                        <kitMedia3D:AxisAngleRotation3D />
                                                    </kitMedia3D:RotateTransform3D.Rotation>
                                                </kitMedia3D:RotateTransform3D>
                                            <!--</kitMedia:Transform3DGroup.Children> OPTIONAL ELEMENT -->
                                        </kitMedia3D:Transform3DGroup>
                                    </kitMedia3D:GeometryModel3D.Transform>
                                </kitMedia3D:GeometryModel3D>
                            <!--</kitMedia:Model3DGroup.Children> OPTIONAL ELEMENT -->
                        </kitMedia3D:Model3DGroup>
                    </kitMedia3D:ModelVisual3D.Content>
                    <kitMedia3D:ModelVisual3D.Transform>
                        <kitMedia3D:Transform3DGroup>
                            <!--<kitMedia:Transform3DGroup.Children> OPTIONAL ELEMENT -->
                                <kitMedia3D:TranslateTransform3D OffsetX="10" OffsetY="0" OffsetZ="0" />
                                <kitMedia3D:RotateTransform3D />
                            <!--</kitMedia:Transform3DGroup.Children> OPTIONAL ELEMENT -->
                        </kitMedia3D:Transform3DGroup>
                    </kitMedia3D:ModelVisual3D.Transform>
                </kitMedia3D:ModelVisual3D>
            </kitControls:Viewport3D.Children>
        </kitControls:Viewport3D>
    </Grid>
</UserControl>
